﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using FaceRecognizer;
using project1113.Wrold;
using System.Drawing;
using ViewFaceCore;
using ViewFaceCore.Core;
using project1113;
using project1113.FSM;

namespace project1113.states
{
    internal class WaitState : FsmState
    {
        public WaitState() : base("wait state") { }

        private string? _name { set; get; } = null;

        public override void Init()
        {
            WorldModel.CurrentWorld.Face.Running = true;
        }
        public override void DoSomething()
        {
            
            _name = WorldModel.CurrentWorld.Face.FaceName;
            DisplayHelper.LoadPage("TimePage");
        }
        
        public override FsmState GetNextState()
        {
            if (_name != null)
            {
                return new WaitCallState(_name);
            }
            else
            {
                return this;
            }

        }
    }
}
